{include file="public/header" /}

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.ds_affiche}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>{$Think.lang.affiche_title}</dt>
                <dd><input type="text" value="{$Request.param.title}" name="title" class="txt" title=""></dd>
            </dl>
            <dl>
                <dt>{$Think.lang.affiche_type}</dt>
                <dd>
                <select name="type_id" title="" style="width: 160px;">
                    <option value="">{$Think.lang.ds_please_choose}...</option>
                    {foreach name="$type_list" item="v" key="k"}
                    <option value="{$v.id}" {if condition="$Request.param.type_id eq $v.id" }selected{/if}>{$v.name}</option>
                    {/foreach}
                </select>
                </dd>
            </dl>
            <div class="btn_group">
                <input type="submit" class="btn" value="{$Think.lang.ds_search}">
                    {if $title != '' || $type_id != ''}
                    <a style="width: 29px;margin-top: -50px;margin-left: 89px;" class="btn" href="{:url('Affiche/index')}" title="{$Think.lang.ds_cancel_search}"><span>取消</span></a>
                    {/if}
                
            </div>
        </div>
    </form>

    <table class="ds-default-table">
        <thead>
            <tr>
                <th>{$Think.lang.ds_sort}</th>
                <th>{$Think.lang.affiche_title}</th>
                <th>{$Think.lang.affiche_type}</th>
                <th>开始时间</th>
                <th>结束时间</th>
                <th>操作人</th>
                <th>更新时间</th>
                <th>已读</th>
                <th>未读</th>
                <th>{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        <tbody>
        {notempty name="list"}
        {foreach name="list" item="item"}
        <tr id="ds_row_{$item.affiche_id}">
            <td>{$item.affiche_id}</td>
            <td>{$item.title}</td>
            <td>{$item.name|default=''}</td>
            <td>{$item.start_time|default= ''|date='Y-m-d',###}</td>
            <td>{$item.end_time|default= ''|date='Y-m-d',###}</td>
            <td>{$item.admin_name|default=''}</td>
            <td>{$item.updated_at|substr=0,16}</td>
            <td>{$item.already_read}</td>
            <td>{$item.unread}</td>
            <td>
                <a href="{:url('Affiche/edit',['affiche_id'=>$item.affiche_id])}" class="dsui-btn-edit"><i
                        class="iconfont"></i>{$Think.lang.ds_edit}</a>
                <a href="javascript:dsLayerConfirm('{:url('Affiche/cancels',['affiche_id'=>$item.affiche_id])}','{$Think.lang.ds_ensure_del}',{$item.affiche_id})"
                   class="dsui-btn-del">
                    <i class="iconfont"></i>{$Think.lang.ds_del}
                </a>
            </td>
        </tr>
        {/foreach}
        {else /}
        <tr class="no_data">
            <td colspan="10">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
        </tbody>
    </table>
    {$show_page}
</div>